package spring.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LogAspect {
    @Pointcut("execution(* org.springframework.data.redis.core.RedisTemplate.*(..))")
    public void controllerMethod() {

    }
    @Before("controllerMethod()")
    public void beforeExecute() {
        System.out.println("before...");
    }

    @After("controllerMethod()")
    public void afterExecute() {
        System.out.println("after...");
    }
}